<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Bakalarka: Zdrojový soubor src/gType.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generováno programem Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Hlavní&nbsp;stránka</span></a></li>
      <li><a href="annotated.html"><span>Třídy</span></a></li>
      <li class="current"><a href="files.html"><span>Soubory</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Seznam&nbsp;souborů</span></a></li>
    </ul>
  </div>
<h1>src/gType.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> *      This program is free software; you can redistribute it and/or modify</span>
<a name="l00003"></a>00003 <span class="comment"> *      it under the terms of the GNU General Public License as published by</span>
<a name="l00004"></a>00004 <span class="comment"> *      the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00005"></a>00005 <span class="comment"> *      (at your option) any later version.</span>
<a name="l00006"></a>00006 <span class="comment"> *      </span>
<a name="l00007"></a>00007 <span class="comment"> *      This program is distributed in the hope that it will be useful,</span>
<a name="l00008"></a>00008 <span class="comment"> *      but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00009"></a>00009 <span class="comment"> *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00010"></a>00010 <span class="comment"> *      GNU General Public License for more details.</span>
<a name="l00011"></a>00011 <span class="comment"> *      </span>
<a name="l00012"></a>00012 <span class="comment"> *      You should have received a copy of the GNU General Public License</span>
<a name="l00013"></a>00013 <span class="comment"> *      along with this program; if not, write to the Free Software</span>
<a name="l00014"></a>00014 <span class="comment"> *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,</span>
<a name="l00015"></a>00015 <span class="comment"> *      MA 02110-1301, USA.</span>
<a name="l00016"></a>00016 <span class="comment"> */</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef _GTYPE_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define _GTYPE_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;limits&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;cstring&gt;</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#include "reader.h"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "lexical.h"</span>
<a name="l00029"></a>00029 
<a name="l00031"></a>00031 <span class="preprocessor">#define TYPE_LINEAR_MOVE                0</span>
<a name="l00033"></a>00033 <span class="preprocessor">#define TYPE_LINEAR_CUT                 1</span>
<a name="l00035"></a>00035 <span class="preprocessor">#define TYPE_ARC_CLOCK                  2</span>
<a name="l00037"></a>00037 <span class="preprocessor">#define TYPE_ARC_COUNTER                3</span>
<a name="l00039"></a>00039 <span class="preprocessor">#define TYPE_COORDINATES_ABS    90</span>
<a name="l00041"></a>00041 <span class="preprocessor">#define TYPE_COORDINATES_REL    91</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00044"></a>00044 
<a name="l00049"></a><a class="code" href="classgType.html">00049</a> <span class="keyword">class </span><a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a>{
<a name="l00050"></a>00050 
<a name="l00051"></a>00051         <span class="keyword">private</span>:
<a name="l00052"></a>00052                 <a class="code" href="classlexical_1_1token.html#72fac20575d593354489722a726176df" title="Výčet všech symbolů.">lexical::token::symbols</a> symbol;
<a name="l00053"></a>00053         
<a name="l00054"></a>00054         <span class="keyword">public</span>:
<a name="l00055"></a>00055                 <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a>(<a class="code" href="classlexical_1_1token.html#72fac20575d593354489722a726176df" title="Výčet všech symbolů.">lexical::token::symbols</a>);
<a name="l00057"></a>00057 
<a name="l00062"></a>00062                 <span class="keyword">virtual</span> <a class="code" href="classlexical_1_1token.html#72fac20575d593354489722a726176df" title="Výčet všech symbolů.">lexical::token::symbols</a> <a class="code" href="classgType.html#536e7d3927cf37b402f0b32dbf18164d" title="Vrací symbol.">getSymbol</a>() <span class="keyword">const</span>;
<a name="l00064"></a>00064 
<a name="l00070"></a>00070                 <span class="keyword">virtual</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> *<a class="code" href="classgType.html#e4360c936983986b9bc9e97c4060c0dc" title="Kopíruje objekt.">copy</a>() <span class="keyword">const</span>;
<a name="l00072"></a>00072 
<a name="l00076"></a>00076                 <span class="keyword">virtual</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> &amp;<a class="code" href="classgType.html#6ae123667dca44f2532242cc8dfa959f" title="Přetížený operátor přiřazení.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> &amp;);
<a name="l00077"></a>00077 
<a name="l00078"></a>00078 };
<a name="l00079"></a>00079 
<a name="l00081"></a>00081 
<a name="l00086"></a><a class="code" href="classgTypeGo.html">00086</a> <span class="keyword">class </span><a class="code" href="classgTypeGo.html" title="Typ linearní interpolace.">gTypeGo</a>: <span class="keyword">public</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a>{
<a name="l00087"></a>00087 
<a name="l00088"></a>00088         <span class="keyword">private</span>:
<a name="l00089"></a>00089                 <span class="keywordtype">unsigned</span> typeValue;
<a name="l00090"></a>00090                 <span class="keywordtype">float</span> xyzCoordinates[3];
<a name="l00091"></a>00091                 
<a name="l00092"></a>00092         <span class="keyword">public</span>:
<a name="l00094"></a>00094 
<a name="l00101"></a>00101                 <a class="code" href="classgTypeGo.html#f8ce2b139deeac1c2abf308c30a29034" title="Konstrukor typu linearní interpolace.">gTypeGo</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
<a name="l00102"></a>00102                 
<a name="l00104"></a>00104 
<a name="l00107"></a>00107                 <span class="keywordtype">unsigned</span> <a class="code" href="classgTypeGo.html#e9470cd8f1dc3f0f1e73f4fb1188b75f" title="Vrací typ symbolu.">getTypeValue</a>() <span class="keyword">const</span>;
<a name="l00109"></a>00109 
<a name="l00114"></a>00114                 <span class="keyword">virtual</span> <span class="keywordtype">float</span> &amp;<a class="code" href="classgTypeGo.html#574e11b0a4f857b76fe7a58e307aa739" title="Vrací souřadnici.">operator[]</a>(<span class="keywordtype">unsigned</span>);
<a name="l00115"></a>00115                 <span class="keyword">virtual</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> *<a class="code" href="classgTypeGo.html#1019ed357c8411356b185edf0a525d9a" title="Kopíruje objekt.">copy</a>() <span class="keyword">const</span>;
<a name="l00116"></a>00116                 <span class="keyword">virtual</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> &amp;<a class="code" href="classgTypeGo.html#e58d9da8f28a21cc8c3129a2b145792b" title="Přetížený operátor přiřazení.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> &amp;);
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 };
<a name="l00119"></a>00119 
<a name="l00121"></a>00121 
<a name="l00126"></a><a class="code" href="classgTypeGoCircle.html">00126</a> <span class="keyword">class </span><a class="code" href="classgTypeGoCircle.html" title="Typ kruhové interpolace.">gTypeGoCircle</a>: <span class="keyword">public</span> <a class="code" href="classgTypeGo.html" title="Typ linearní interpolace.">gTypeGo</a>{
<a name="l00127"></a>00127 
<a name="l00128"></a>00128         <span class="keyword">private</span>:
<a name="l00129"></a>00129                 <span class="keywordtype">float</span> ijkCoordinates[3];
<a name="l00130"></a>00130         
<a name="l00131"></a>00131         <span class="keyword">public</span>:
<a name="l00133"></a>00133 
<a name="l00145"></a>00145                 <a class="code" href="classgTypeGoCircle.html#ba3f98ea886cdcdf84a7125e27a6ce4a" title="Konstrukor typu kruhová interpolace.">gTypeGoCircle</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
<a name="l00147"></a>00147 
<a name="l00152"></a>00152                 <span class="keyword">virtual</span> <span class="keywordtype">float</span> &amp;<a class="code" href="classgTypeGoCircle.html#104752281994fe95c7dc726166d8711d" title="Vrací souřadnici.">operator[]</a>(<span class="keywordtype">unsigned</span>);
<a name="l00153"></a>00153                 <span class="keyword">virtual</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> *<a class="code" href="classgTypeGoCircle.html#5cc130a63473814a5437dca487288384" title="Kopíruje objekt.">copy</a>() <span class="keyword">const</span>;
<a name="l00154"></a>00154                 <span class="keyword">virtual</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> &amp;<a class="code" href="classgTypeGoCircle.html#4aa062913d09a6a8c76d6817b67b5648" title="Přetížený operátor přiřazení.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> &amp;);
<a name="l00155"></a>00155 
<a name="l00156"></a>00156 };
<a name="l00157"></a>00157 
<a name="l00159"></a>00159 
<a name="l00165"></a><a class="code" href="classgObject.html">00165</a> <span class="keyword">class </span><a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a>: <span class="keyword">public</span> std::vector&lt;gType *&gt;{
<a name="l00166"></a>00166 
<a name="l00167"></a>00167         <span class="keyword">private</span>:
<a name="l00168"></a>00168                 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> GAP = 0.001;
<a name="l00169"></a>00169         
<a name="l00170"></a>00170                 std::string name;
<a name="l00171"></a>00171                 <span class="keywordtype">bool</span> relative, forceRelative;
<a name="l00172"></a>00172                 <span class="keywordtype">float</span> feed, originalFeed;
<a name="l00173"></a>00173                 <span class="keywordtype">int</span> spindle, originalSpindle;
<a name="l00174"></a>00174                 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> startOffset, length;
<a name="l00175"></a>00175                 
<a name="l00176"></a>00176         <span class="keyword">public</span>:
<a name="l00177"></a>00177                 <a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a>();
<a name="l00179"></a>00179 
<a name="l00185"></a>00185                 <a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a>(<a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a> *);
<a name="l00186"></a>00186                 ~<a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a>();
<a name="l00187"></a>00187                 
<a name="l00189"></a>00189                 <span class="keywordtype">bool</span> isForceRelative()<span class="keyword"> const</span>
<a name="l00190"></a>00190 <span class="keyword">                        </span>{ <span class="keywordflow">return</span> forceRelative; };
<a name="l00192"></a>00192                 <span class="keywordtype">void</span> setForceRelative(<span class="keywordtype">bool</span> <span class="keywordtype">boolean</span>)
<a name="l00193"></a>00193                         { forceRelative = boolean; };
<a name="l00195"></a>00195                 <span class="keywordtype">void</span> setOriginalFeed(<span class="keywordtype">float</span> f)
<a name="l00196"></a>00196                         { originalFeed = f; };
<a name="l00198"></a>00198                 <span class="keywordtype">float</span> getOriginalFeed()<span class="keyword"> const</span>
<a name="l00199"></a>00199 <span class="keyword">                        </span>{ <span class="keywordflow">return</span> originalFeed; };
<a name="l00201"></a>00201                 <span class="keywordtype">void</span> setOriginalSpindle(<span class="keywordtype">int</span> s)
<a name="l00202"></a>00202                         { originalSpindle = s; };
<a name="l00204"></a>00204                 <span class="keywordtype">int</span> getOriginalSpindle()<span class="keyword"> const</span>
<a name="l00205"></a>00205 <span class="keyword">                        </span>{ <span class="keywordflow">return</span> originalSpindle; };
<a name="l00206"></a>00206                 
<a name="l00208"></a>00208                 <span class="keywordtype">bool</span> <a class="code" href="classgObject.html#23f7ab56bf567bcfadeec5643cf8e942" title="Jestli byly použité relativní souřadnice.">isRelative</a>() <span class="keyword">const</span>;
<a name="l00210"></a>00210                 <span class="keywordtype">void</span> <a class="code" href="classgObject.html#fb13baa55ad42197c9f403a07866f7ce" title="Nastavit relativní souřadnice.">setRelative</a>(<span class="keywordtype">bool</span>);
<a name="l00212"></a>00212                 <span class="keywordtype">float</span> <a class="code" href="classgObject.html#82188b47c193cb542ef82fbe323041aa" title="Vrací rychlost posuvu před vstupem do bloku.">getFeed</a>() <span class="keyword">const</span>;
<a name="l00214"></a>00214                 <span class="keywordtype">void</span> <a class="code" href="classgObject.html#2b1b741d0ce0438f99ccf51dfca80ba5" title="Nastaví rychlost posuvu před vstupem do bloku.">setFeed</a>(<span class="keywordtype">float</span>);
<a name="l00216"></a>00216                 <span class="keywordtype">int</span> <a class="code" href="classgObject.html#e2cda3ae5d99cba0d95d371e0b479eb6" title="Vratí počet otáček vřetena před vstupem do bloku.">getSpindle</a>() <span class="keyword">const</span>;
<a name="l00218"></a>00218                 <span class="keywordtype">void</span> <a class="code" href="classgObject.html#7ea78f5c6f0ce7153d4f6dc575648179" title="Nastaví počet otáček vřetena před vstupem do bloku.">setSpindle</a>(<span class="keywordtype">int</span>);
<a name="l00220"></a>00220 
<a name="l00227"></a>00227                 <span class="keywordtype">void</span> <a class="code" href="classgObject.html#358e82e06ac7b851a1297fd0e364fe79" title="Nastaví absolutní offset začátku bloku v souboru a počet bytů od začátku...">setOffsets</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);
<a name="l00229"></a>00229                 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classgObject.html#9acaca7e8deddd676a21f885a3079678" title="Vrací offset začáteku bloku v souboru.">getStartOffset</a>() <span class="keyword">const</span>;
<a name="l00231"></a>00231                 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classgObject.html#e3516f2fc7268b9cb9186ffe24d3005d" title="Vrací počet znaků od začátku bloku po konec.">getLength</a>() <span class="keyword">const</span>;
<a name="l00233"></a>00233 
<a name="l00239"></a>00239                 <span class="keywordtype">float</span> *<a class="code" href="classgObject.html#86b56954cb2cb8235150c0f4495e38e5" title="Vrací obdelník v kterém se nachází.">getRectangle</a>(<span class="keywordtype">float</span> *);
<a name="l00241"></a>00241                 <span class="keywordtype">void</span> <a class="code" href="classgObject.html#67ceea72b5b2bcd949d9972c0768200f" title="Nastaví jméno bloku.">setName</a>(std::string &amp;);
<a name="l00243"></a>00243                 std::string &amp;<a class="code" href="classgObject.html#3763170fc4ff141c0b6f4ba007e0bc81" title="Vrací jméno bloku.">getName</a>();
<a name="l00245"></a>00245 
<a name="l00249"></a>00249                 <span class="keywordtype">int</span> <a class="code" href="classgObject.html#fb13fb773a46eb9d5fc5e976f73809ba" title="Aktualní index (umísťění) objektu v kontejneru.">getIndexByObject</a>(<a class="code" href="classgType.html" title="Zakladní typ instrukce.">gType</a> *) <span class="keyword">const</span>;
<a name="l00251"></a>00251                 <a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a> &amp;<a class="code" href="classgObject.html#402ec8056ba82535e722de8aabb555f5" title="Obstarává správné skopírování objektu.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a> &amp;);
<a name="l00252"></a>00252                 
<a name="l00253"></a>00253                 <a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a> getHight(<a class="code" href="classgTypeGo.html" title="Typ linearní interpolace.">gTypeGo</a> &amp;);
<a name="l00254"></a>00254                 
<a name="l00255"></a>00255 };
<a name="l00256"></a>00256 
<a name="l00258"></a>00258 
<a name="l00261"></a><a class="code" href="classgObjectContainer.html">00261</a> <span class="keyword">class </span><a class="code" href="classgObjectContainer.html" title="Kontejner bloků.">gObjectContainer</a>: <span class="keyword">public</span> std::vector&lt;gObject *&gt;{
<a name="l00262"></a>00262         
<a name="l00263"></a>00263         <span class="keyword">public</span>:
<a name="l00264"></a>00264                 <a class="code" href="classgObjectContainer.html" title="Kontejner bloků.">gObjectContainer</a>();
<a name="l00266"></a>00266 
<a name="l00272"></a>00272                 <a class="code" href="classgObjectContainer.html#4330be927e00c3d5706e077ad3d8467c" title="Vytváří hlubukou kopii objektu.">~gObjectContainer</a>();
<a name="l00273"></a>00273                 
<a name="l00274"></a>00274                 <a class="code" href="classgObjectContainer.html" title="Kontejner bloků.">gObjectContainer</a>(<a class="code" href="classgObjectContainer.html" title="Kontejner bloků.">gObjectContainer</a> *);
<a name="l00279"></a>00279                 <a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a> *<a class="code" href="classgObjectContainer.html#92401c05afd0fcc65914f048b9ed4bc3">getObjectByName</a>(std::string &amp;);
<a name="l00281"></a>00281 
<a name="l00287"></a>00287                 <span class="keywordtype">float</span> *<a class="code" href="classgObjectContainer.html#a862bf06688ad18c64afe876fd4a430e" title="Vrací obdelník v kterém se nachází.">getRectangle</a>(<span class="keywordtype">float</span> *);
<a name="l00289"></a>00289 
<a name="l00293"></a>00293                 <span class="keywordtype">int</span> <a class="code" href="classgObjectContainer.html#795f4cc0ae019e828925c98bdec390f7" title="Aktualní index (umísťění) objektu v kontejneru.">getIndexByObject</a>(<a class="code" href="classgObject.html" title="Kontejner pro instrukce.">gObject</a> *) <span class="keyword">const</span>;
<a name="l00295"></a>00295                 <a class="code" href="classgObjectContainer.html" title="Kontejner bloků.">gObjectContainer</a> &amp;<a class="code" href="classgObjectContainer.html#4d429f0a36258766e0f1633d5ab57832" title="Obstarává správné skopírování objektu.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classgObjectContainer.html" title="Kontejner bloků.">gObjectContainer</a> &amp;);
<a name="l00296"></a>00296                 
<a name="l00297"></a>00297                 <a class="code" href="classgObjectContainer.html" title="Kontejner bloků.">gObjectContainer</a> getHight(<a class="code" href="classgTypeGo.html" title="Typ linearní interpolace.">gTypeGo</a> &amp;);
<a name="l00298"></a>00298                 
<a name="l00299"></a>00299         
<a name="l00300"></a>00300 };
<a name="l00301"></a>00301 
<a name="l00302"></a>00302 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generováno Tue Mar 2 10:34:16 2010 pro projekt Bakalarka programem&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>
